package com.chaoyi.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.chaoyi.dao.mysql.UserMapper;
import com.chaoyi.model.User;
import com.chaoyi.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	
	@Resource
	private UserMapper userMapper;

	@Override
	public List<User> findUserList(String offset,String limit,User user) {
		List<User> userList = userMapper.findUserList(offset,limit,user);
		return userList;
	}

	@Override
	public int findUserNameNum(String userName ,int id) {
		return userMapper.findUserNameNum(userName,id);
	}

	@Override
	public int addUser(User user) {
		return userMapper.addUser(user);
	}

	@Override
	public int selectUsernumber() {
		return userMapper.selectUsernumber();
	}

	@Override
	public User findUserOne(int id) {
		return userMapper.findUserOne(id);
	}

	@Override
	public int updateUser(User user) {
		return userMapper.updateUser(user);
	}

	@Override
	public int deleteUser(int id) {
		return userMapper.deleteUser(id);
	}

	@Override
	public List<User> findBusiness() {
		return userMapper.findBusiness();
	}

}
